/*
 * @Description: 
 * @Autor: LiYuan
 * @Date: 2021-05-07 16:17:06
 * @LastEditors: 川杨
 * @LastEditTime: 2022-10-28 14:59:43
 */

import http from '@src/util/http' 
let prefix = '/api/user/outside';

/** 
 * @description 登出
 * @param {Object} params 参数对象
 */
export function logOut(params = {}) {
  return http.get(`${prefix}/loginOut`, params)
}

/** 
 * @description 模拟登录
 * @param {Object} params 参数对象
 */
export function mockLogin(params = {}) {
  return http.get(`${prefix}/outside/mock/login`, params)
}

/** 
 * @description 获取首页菜单接口
 * @param {Object} params 参数对象
 */
export function getMenuForVersion(params = {}) {
  return http.get(`${prefix}/menu/getMenuForVersion`, params)
}

// 查询用户当前隐私按钮是否同意
export function getUserField(params) {
  return http.get(`${prefix}/user/getUserField`, params);
}

// 同意隐私协议
export function addUserField(params) {
  return http.get(`${prefix}/user/addUserField`, params);
}

// 获取权限
export function getRoleAuthority(params) {
  return http.get(`${prefix}/authority/view/getRoleAuthority`, params);
}

// 获取菜单列表
export function getPcHomePageMenuList(params) {
  return http.get(`${prefix}/app/getPcHomePageMenuList/v2`, params)
}

// 获取菜单列表v2版本
export function getPcHomePageMenuListV2(params) {
  return http.get(`${prefix}/app/getPcHomePageMenuList/v2`, params)
}

// 更新定期修改密码弹框 
export function judgeUpdatePassWord(params) {
  return http.get(`${prefix}/user/user/judgeUpdatePassWord`, params);
}

/**
 * 校验页面访问权限
 * @returns {*}
 */
export function checkRequestUrl(params) {
  return http.post(`${prefix}/authority/checkRequestUrl`,params)
}

/**
 * @description 获取国际化帐号信息
 * @see http://yapi.shb.ltd/project/307/interface/api/50426
 */
export function getInternalAccountInfo(params = {}) {
  return http.get(`${prefix}/user/getInternalAccountInfo`,params)
}


/**
 * @des 用户查询资质证书
 * @see http://yapi.shb.ltd/project/307/interface/api/55620
 */
export function getUserConcatQualification(params = {}) {
  return http.post('/api/user/outside/qualification/biz/list',params)
}

/**
 * @dse 列表查询
 * @see http://yapi.shb.ltd/project/5230/interface/api/55571
 */
export function getListQualificationManagement (params){
  return http.post('/api/user/outside/qualification/data/list', params)
}

/**
 * @dse 增加资质关联数据
 * @see http://yapi.shb.ltd/project/5230/interface/api/55613
 */
export function saveQualificationManagement (params){
  return http.post('/api/user/outside/qualification/biz/add', params)
}

/**
 * @dse 用户资质证书编辑
 * @see http://yapi.shb.ltd/project/5230/interface/api/55634
 */
export function editQualificationManagement (params){
  return http.post('/api/user/outside/qualification/biz/edit', params)
}

/**
 * @dse 用户资质证书移除
 * @see http://yapi.shb.ltd/project/5230/interface/api/55627
 */
export function deleteQualificationManagement (params){
  return http.post('/api/user/outside/qualification/biz/delete', params)
}

/**
 * @dse 用户角色关联资质校验
 * @see http://yapi.shb.ltd/project/5230/interface/api/55774
 */
export function validateRoleQualificationManagement (params){
  return http.post('/api/user/outside/qualification/biz/role/check', params)
}

/**
 * @description 钉钉-pc 免登录构造参数
 */
export function getDDFreeLoginConfig(params) {
  return http.get(`${prefix}/dd/free/login/config`, params)
}